package com.lgc.javathread.chapter1.t3;

public class MyThread extends Thread {
    private int count=2;
    public MyThread(String name)
    {
        super();
        this.setName(name);//设置线程名称
    }

    @Override
    public void run()
    {
        super.run();
        while (count>0)
        {
            count--;
            System.out.println("由 "+Thread.currentThread().getName()+" 计算，count="+count);
        }
    }
}
